1. Field of the Invention
The present invention relates to a system, method, and program for superimposing data records in a first data format to memory in a second data format
2. Description of the Related Art
Data stored in a direct access storage device (DASD) may be arranged in a fixed block address (FBA) format or a count-key-data (CKD) format. The FBA format involves the storage of data in blocks of fixed size. These blocks are addressed by a block number relative to the beginning of the file. An FBA block is referred to as a sector, which is addressable by the host. The CKD format is a DASD data-recording format employing self-defining record formats in which each record is represented by a count area that identifies the record and specifies its format, an optional key area that may be used to identify the data area contents, and a data area that contains the user data for the record. The CKD format provides for variable format data records.
FIG. 1 illustrates a prior art structure for a single CKD track in a CKD device. An index point (IP) is a starting point, followed by a gap (G), which indicates a break between the fields. A home address (HA) follows the first gap (G) and identifies the location of the track in the DASD and its operational status. Following the home address (HA) are the records, R.sub.0 through R.sub.n. Record zero (R.sub.0) contains either system or user data. Each following record, R.sub.1 through R.sub.n, includes a count area that identifies the record and defines the lengths of the key and data areas. The key area of each record is optional and may be used by the programmer to identify the information in the data area record. The data area contains data. The number of records (R) that can be placed on a track depends on the length of the data areas of the records, whether the records contain a key area, and the size of the gaps. Records may be of equal or unequal lengths.
Host systems may need to write data in a CKD format to a DASD that stores data in FBA blocks because most storage devices, such as hard disk drives, use the FBA format to store data in fixed blocks. Host systems, such as the International Business Machines Corporation (IBM) Enterprise System Controller (ESCON) devices, continue to utilize the CKD format because CKD permits data records to be recorded as units of contiguous signals. Whereas, with FBA, data must be dissected and distributed into a group of fixed block-size sectors. Moreover, since the introduction of the IBM System/360 in 1964, nearly all IBM large and intermediate DASD devices employ the CKD data format. For these reasons, there is a need to store CKD records in FBA devices. In fact, the prior art provides techniques for emulating the CKD format on FBA devices and for converting CKD formatted records to the FBA format. Such CKD to FBA conversion techniques are taught in U.S. Pat. Nos. 5,535,372, 6,041,386, 5,535,372, and 5,664,144, which are all incorporated herein by reference in its entirety.
The transformation of a CKD record to FBA storage is typically implemented by the storage controller processor operating under the control of microcode. One disadvantage of using the primary storage controller processor to perform the CKD to FBA transformation is the significant burden placed on the storage controller processor. Dedicating storage processor cycles to CKD to FBA conversions can affect performance with respect to other Input/Output (I/O) operations handled by the storage controller processor. To address this problem, many high end storage controller systems, such as the IBM Enterprise Storage System (ESS), include a separate dedicated Application Specific Integrated Circuit (ASIC) to transform CKD records to a FBA format for storage in a FBA DASD. However, solutions that add a special-purpose ASIC to handle the CKD to FBA conversions increases the cost of the system.
For these reasons, there is a need in the art to provide alternative techniques for superimposing a CKD record onto FBA blocks of a DASD.
Provided is a method, system, and program for superimposing a data record in a first data format onto a storage space in a second data format. A plurality of control blocks are built in memory indicating operations to perform to transfer components of the data record in the first data format to locations in memory in the second data format. A data transfer device is signaled to access the control blocks built in the memory. The data transfer device accesses the control blocks in the memory and then transfers components of the data record in the first data format to the memory to be stored in the second data format according to the operations indicated in the control blocks.
In further embodiments, the control blocks further instruct the data transfer device to generate an error checking code from the data record and write the error checking code into the memory to store with the data record in the second data format.
Still further, a processor may build the control blocks in memory and signal the data transfer device with the pointer to the first control block in the memory.
Yet further, the first data format may comprise a count-key-data (CKD) data format and the second data format may comprise a Fixed Block Address (FBA) format.